{% extends 'resume_manage/base_information.html' %}

{% load static %}

{% block content %}
    <div class="container">
        <h2>专业技能</h2>
        <form id="skills-form" method="post">
            {% csrf_token %}
            <div class="experience-item">
                <div class="form-group">
                    <label for="skill_name">技能名称</label>
                    <input type="text" class="form-control" id="skill_name" name="skill_name" required
                           value="{{ form.name }}">
                </div>

                <div class="form-group">
                    <label for="skill_level">熟练程度</label>
                    <select class="form-control" id="skill_level" name="skill_level" required>
                        <option value="">请选择</option>
                        <option value="了解" {% if form.level == '了解' %}selected{% endif %}>了解</option>
                        <option value="熟悉" {% if form.level == '熟悉' %}selected{% endif %}>熟悉</option>
                        <option value="精通" {% if form.level == '精通' %}selected{% endif %}>精通</option>
                        <option value="专家" {% if form.level == '专家' %}selected{% endif %}>专家</option>
                    </select>
                </div>

                <div class="form-group">
                    <label for="skill_description">技能描述</label>
                    <textarea class="form-control" id="skill_description" name="skill_description"
                              rows="3">{{ form.description }}</textarea>
                </div>
            </div>

            <a href="#" class="add-section" id="add-skill"><i class="fas fa-plus-circle"></i> 添加技能</a>

            <div class="action-buttons">
                <button type="submit" class="btn btn-primary" id="save-skills">保存</button>
            </div>
        </form>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
    <script src="{% static 'js/skills.js' %}"></script>
{% endblock %}